/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JefeMercadeo.java
 *
 * Created on 8/06/2009, 09:25:05 AM
 */

package CRM_UI;

import java.awt.Cursor;

/**
 *
 * @author L¡z
 */
public class JefeMercadeo extends javax.swing.JFrame {

    LoginUI cambiarPerfil;
    Cursor handCursor = new Cursor(Cursor.HAND_CURSOR);
    Cursor defaultCursor = new Cursor(Cursor.DEFAULT_CURSOR);
    String login;
    /** Creates new form JefeMercadeo */
    public JefeMercadeo(LoginUI cambiarPerfil, String login) {
        initComponents();
        setLocationRelativeTo(null);
        this.login = login;
        this.cambiarPerfil=cambiarPerfil;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        serviciosLabel = new javax.swing.JLabel();
        categoriasLabel = new javax.swing.JLabel();
        campaNaLabel = new javax.swing.JLabel();
        productosLabel = new javax.swing.JLabel();
        reportesLabel = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        contraseNaLabel = new javax.swing.JLabel();
        botonPerfil = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Berlin Sans FB", 0, 18));
        jLabel1.setText("Jefe de Mercadeo");

        jLabel2.setText("Productos");

        jLabel3.setText("Servicios");

        jLabel4.setText("Categorias");

        jLabel5.setText("Campaña Publicitaria");

        serviciosLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/servicios.png"))); // NOI18N
        serviciosLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                serviciosLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                serviciosLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                serviciosLabelMouseExited(evt);
            }
        });

        categoriasLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/categorias.png"))); // NOI18N
        categoriasLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                categoriasLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                categoriasLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                categoriasLabelMouseExited(evt);
            }
        });

        campaNaLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/campañaPublicitaria.png"))); // NOI18N
        campaNaLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                campaNaLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                campaNaLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                campaNaLabelMouseExited(evt);
            }
        });

        productosLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/productos.png"))); // NOI18N
        productosLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                productosLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                productosLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                productosLabelMouseExited(evt);
            }
        });

        reportesLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/WOA_CandyBar Toolbar - Documents.png"))); // NOI18N
        reportesLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                reportesLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                reportesLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                reportesLabelMouseExited(evt);
            }
        });

        jLabel11.setText("Reportes");

        jLabel12.setText("Contraseña");

        contraseNaLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Lock.png"))); // NOI18N
        contraseNaLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                contraseNaLabelMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                contraseNaLabelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                contraseNaLabelMouseExited(evt);
            }
        });

        botonPerfil.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/cambiarPerfil.png"))); // NOI18N
        botonPerfil.setToolTipText("Permite al usuario cambiar de perfil");
        botonPerfil.setFocusPainted(false);
        botonPerfil.setRequestFocusEnabled(false);
        botonPerfil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonPerfilActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(37, 37, 37)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(productosLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2)
                            .addComponent(jLabel5)
                            .addComponent(campaNaLabel))
                        .addGap(51, 51, 51)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(categoriasLabel)
                            .addComponent(jLabel4)
                            .addComponent(serviciosLabel)
                            .addComponent(jLabel3)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(botonPerfil, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 86, Short.MAX_VALUE)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(52, 52, 52)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(jLabel11)
                            .addComponent(reportesLabel)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(44, 44, 44)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(jLabel12)
                            .addComponent(contraseNaLabel))))
                .addContainerGap(23, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(botonPerfil)
                            .addComponent(jLabel1))
                        .addGap(8, 8, 8)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(categoriasLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(campaNaLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(37, 37, 37)
                        .addComponent(reportesLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel11)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(contraseNaLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel12)
                        .addContainerGap(28, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(serviciosLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 63, Short.MAX_VALUE)
                                .addGap(4, 4, 4))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(productosLabel)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(31, 31, 31))))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(18, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botonPerfilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonPerfilActionPerformed
        // TODO add your handling code here:
        this.dispose();
        cambiarPerfil.limpiarCampos();
        cambiarPerfil.setVisible(true);
    }//GEN-LAST:event_botonPerfilActionPerformed

    private void campaNaLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_campaNaLabelMouseClicked
        // TODO add your handling code here:
        GestionarCampaNaPublicitariaUI objGestionarCampaNa = new GestionarCampaNaPublicitariaUI();
        objGestionarCampaNa.setVisible(true);
    }//GEN-LAST:event_campaNaLabelMouseClicked

    private void campaNaLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_campaNaLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_campaNaLabelMouseEntered

    private void campaNaLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_campaNaLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_campaNaLabelMouseExited

    private void categoriasLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_categoriasLabelMouseClicked
        // TODO add your handling code here:
        GestionarCategoriasUI objGestionarCategorias = new GestionarCategoriasUI();
        objGestionarCategorias.setVisible(true);
    }//GEN-LAST:event_categoriasLabelMouseClicked

    private void categoriasLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_categoriasLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_categoriasLabelMouseEntered

    private void categoriasLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_categoriasLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_categoriasLabelMouseExited

    private void reportesLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesLabelMouseClicked
        // TODO add your handling code here:
        ReportesJefeMercadeoUI objReporte = new ReportesJefeMercadeoUI ();
        objReporte.setVisible(true);
    }//GEN-LAST:event_reportesLabelMouseClicked

    private void reportesLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_reportesLabelMouseEntered

    private void reportesLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportesLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_reportesLabelMouseExited

    private void productosLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_productosLabelMouseClicked
        // TODO add your handling code here:
        GestionarProductos objGestionarProductos = new GestionarProductos();
        objGestionarProductos.setVisible(true);
    }//GEN-LAST:event_productosLabelMouseClicked

    private void productosLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_productosLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_productosLabelMouseEntered

    private void productosLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_productosLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_productosLabelMouseExited

    private void serviciosLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_serviciosLabelMouseClicked
        // TODO add your handling code here:
        GestionarServicios objGestionarServicios = new GestionarServicios();
        objGestionarServicios.setVisible(true);
    }//GEN-LAST:event_serviciosLabelMouseClicked

    private void serviciosLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_serviciosLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_serviciosLabelMouseEntered

    private void serviciosLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_serviciosLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_serviciosLabelMouseExited

    private void contraseNaLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_contraseNaLabelMouseClicked
        // TODO add your handling code here:
        ContraseNaUI password = new ContraseNaUI(login, this);
        password.setVisible(true);
        
    }//GEN-LAST:event_contraseNaLabelMouseClicked

    private void contraseNaLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_contraseNaLabelMouseEntered
        // TODO add your handling code here:
        this.setCursor(handCursor);
    }//GEN-LAST:event_contraseNaLabelMouseEntered

    private void contraseNaLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_contraseNaLabelMouseExited
        // TODO add your handling code here:
        this.setCursor(defaultCursor);
    }//GEN-LAST:event_contraseNaLabelMouseExited

    /**
    * @param args the command line arguments
    */
   /*
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new JefeMercadeo().setVisible(true);
            }
        });
    } */

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botonPerfil;
    private javax.swing.JLabel campaNaLabel;
    private javax.swing.JLabel categoriasLabel;
    private javax.swing.JLabel contraseNaLabel;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel productosLabel;
    private javax.swing.JLabel reportesLabel;
    private javax.swing.JLabel serviciosLabel;
    // End of variables declaration//GEN-END:variables

}
